<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="UTF-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <title>bpkg-pkg-status(1) bpkg 0.17.0</title>

  <style type="text/css">
/* file      : common.css
 * license   : MIT; see accompanying LICENSE file
 */

html
{
  font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
  font-weight: normal;
  font-size: 18px;
  line-height: 1.4em;
  letter-spacing: 0.01em;

  color: #292929;
}

body {margin: 0;} /* There is non-0 default margin for body. */

/* See notes on what's going on here. */
body {min-width: 17em;}
@media only screen and (min-width: 360px)
{
  body {min-width: 19em;}
}

/*
 * Header (optional).
 */

#header-bar
{
  width: 100%;

  background: rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);

  padding: .4em 0 .42em 0;
  margin: 0 0 1.4em 0;
}

#header
{
  /* Same as in #content. */
  max-width: 41em;
  margin: 0 auto 0 auto;
  padding: 0 .4em 0 .4em;

  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;

  width: 100%;
  display: table;
  border: none;
  border-collapse: collapse;
}

#header-logo, #header-menu
{
  display: table-cell;
  border: none;
  padding: 0;
  vertical-align: middle;
}

#header-logo {text-align: left;}
#header-menu {text-align: right;}

/* These overlap with #header's margin because of border collapsing. */
#header-logo {padding-left: .4em;}
#header-menu {padding-right: .4em;}

#header-logo a
{
  color: #000;
  text-decoration: none;
  outline: none;
}
#header-logo a:visited {color: #000;}
#header-logo a:hover, #header-logo a:active {color: #000;}

#header-menu a
{
  font-size: 0.889em;
  line-height: 1.4em;
  text-align: right;
  margin-left: 1.2em;
  white-space: nowrap;
  letter-spacing: 0;
}

#header-menu a
{
  color: #000;
  outline: none;
}
#header-menu a:visited {color: #000;}
#header-menu a:hover, #header-menu a:active
{
  color: #3870c0;
  text-decoration: none;
}

/* Flexbox-based improvements though the above works reasonably well. */
#header-menu-body
{
  width: 100%;

  display: -webkit-inline-flex;
  display: inline-flex;

  -webkit-flex-flow: row wrap;
  flex-flow: row wrap;

  -webkit-justify-content: flex-end;
  justify-content: flex-end;
}

/* Whether we want it (and at which point) depends on the size of the menu. */
/*
@media only screen and (max-width: 567px)
{
  #header-menu-body
  {
    -webkit-flex-direction: column;
    flex-direction: column;
  }
}
*/

/*
 * Content.
 */

#content
{
  max-width: 41em;
  margin: 0 auto 0 auto;
  padding: 0 .4em 0 .4em; /* Space between text and browser frame. */

  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

/*
 * Footer (optional).
 */

#footer
{
  color: #767676;
  font-size: 0.7223em;
  line-height: 1.3em;
  margin: 2.2em 0 1em 0;
  text-align: center;
}

#footer a
{
  color: #767676;
  text-decoration: underline;
}
#footer a:visited {color: #767676;}
#footer a:hover, #footer a:active {color: #3870c0;}

/* Screen size indicator in the footer. The before/after content is in case
   we don't have any content in the footer. Margin is to actually see the
   border separate from the browser frame. */

/*
#footer:before {content: "\A0";}
#footer:after {content: "\A0";}

#footer
{
  border-left: 1px solid;
  border-right: 1px solid;
  margin-left: 1px;
  margin-right: 1px;
}

@media only screen and (max-width: 359px)
{
  #footer {border-color: red;}
}

@media only screen and (min-width: 360px) and (max-width: 567px)
{
  #footer {border-color: orange;}
}

@media only screen and (min-width: 568px) and (max-width: 1023px)
{
  #footer {border-color: blue;}
}

@media only screen and (min-width: 1024px)
{
  #footer {border-color: green;}
}
*/

/*
 * Common elements.
 */

p, li, dd {text-align: justify;}
.code {text-align: left;} /* Manually aligned. */
pre {text-align: left;}   /* If it is inside li/dd. */

/* Notes. */

.note
{
  color: #606060;
}

div.note
{
  margin: 2em 0 2em 0; /* The same top/bottom margings as pre box. */

  padding-left: 0.5em;
  border: 0.25em;
  border-left-style: solid;
  border-color: #808080;

  page-break-inside: avoid;
}

div.note :first-child {margin-top:    0;}
div.note :last-child  {margin-bottom: 0;}

span.note::before {content: "[Note: "}
span.note::after  {content: "]"}

/* Links. */
a
{
  color: #3870c0;
  /*color: #4078c0;*/
  text-decoration: none;
}

a:hover, a:active
{
/*color: #006fbf;*/
/*color: #0087e7;*/
  text-decoration: underline;
}

a:visited
{
/*color: #003388;*/
  color: #00409c;
}

/* Standard paragraph. */

p, pre {margin: 1em 0 1em 0;}

/* Standard lists. */
ul, ol, dl {margin: 1em 0 1em 0;}
ul li, ol li {margin: 0 0 .4em 0;}
ul li {list-style-type: circle;}
dl dt {margin: 0 0 0 0;}
dl dd {margin: 0 0 .6em 1.8em;}

code, pre
{
  font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 0.92em;
  letter-spacing: 0;
}

pre {white-space: pre-wrap;}
@media only screen and (max-width: 567px)
{
  pre {word-break: break-all;}
}

/* Use page rather than system font settings. */
input
{
  font-family: inherit;
  font-weight: inherit;
  font-size:   inherit;
  line-height: inherit;
}

/* file      : pre-box.css
 * license   : MIT; see accompanying LICENSE file
 */

/* Note: see also p-code-box.css. */

pre
{
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 0.2em;
  padding: .8em .4em .8em .4em;
  margin: 2em -.4em 2em -.4em; /* Use margins of #content. */
}

/* file      : man.css
 * license   : MIT; see accompanying LICENSE file
 */

/* Bases:
 *
 * common.css
 * pre-box.css
 *
 */

#content
{
  max-width: 42.1em;
  padding-left: 1.5em; /* Reserve for the heading. */
}

h1
{
  font-weight: normal;
  font-size: 1.58em;
  line-height: 1.4em;
  margin: 1.6em 0 .6em -.88em;
}

/* Definition list for options. */
dl.options dt {margin: 1em 0 0 0;}
dl.options dd {margin: .1em 0 0 4.5em;}

/* Make lists inside option descriptions a tad smaller. */
dl.options dd ul, dl.options dd ol, dl.options dd dl
{
  font-size: 0.889em;
  line-height: 1.4em;
}

  </style>

</head>
<body>
<div id="content">

  <h1>NAME</h1>

  <p><b><code>bpkg-pkg-status</code></b> &#8211; print package status</p>
  <h1>SYNOPSIS</h1>

  <p class="code"><code><b>bpkg pkg-status</b>|<b>status</b> [<i>options</i>]
  [<i>pkg</i>[<b>/</b><i>ver</i>]...]</code></p>

  <h1>DESCRIPTION</h1>

  <p>The <code><b>pkg-status</b></code> command prints the status of the
  specified packages or, if <code><i>ver</i></code> is specified, package
  versions. If no packages were specified, then <code><b>pkg-status</b></code>
  prints the status of all the held packages (which are the packages that were
  explicitly built; see <a
  href="bpkg-pkg-build.xhtml"><code><b>bpkg-pkg-build(1)</b></code></a>). The
  latter mode can be modified to print the status of all the packages by
  specifying the <code><b>--all</b>|<b>-a</b></code> option. Additionally, the
  status of immediate or all dependencies of the above packages can be printed
  by specifying the <code><b>--immediate</b>|<b>-i</b></code> or
  <code><b>--recursive</b>|<b>-r</b></code> options, respectively. Note that
  the status is written to <code><b>stdout</b></code>, not
  <code><b>stderr</b></code>.</p>

  <p>The default output format (see the <code><b>--stdout-format</b></code>
  common option) is regular with components separated with spaces. Each line
  starts with the package name followed by one of the status words listed
  below. Some of them can be optionally followed by '<code><b>,</b></code>'
  (no spaces) and a sub-status word. Lines corresponding to dependencies from
  linked configurations will additionally mention the configuration directory
  in square brackets after the package name.</p>

  <dl>
  <dt><code><b>unknown</b></code></dt>
  <dd>Package is not part of the configuration nor available from any of the
  repositories.</dd>

  <dt><code><b>available</b></code></dt>
  <dd>Package is not part of the configuration but is available from one of
  the repositories.</dd>

  <dt><code><b>fetched</b></code></dt>
  <dd>Package is part of the configuration and is fetched.</dd>

  <dt><code><b>unpacked</b></code></dt>
  <dd>Package is part of the configuration and is unpacked.</dd>

  <dt><code><b>configured</b></code></dt>
  <dd>Package is part of the configuration and is configured. May be followed
  by the <code><b>system</b></code> sub-status indicating a package coming
  from the system. The version of such a system package (described below) may
  be the special '<code><b>*</b></code>' value indicating a wildcard
  version.</dd>

  <dt><code><b>broken</b></code></dt>
  <dd>Package is part of the configuration and is broken (broken packages can
  only be purged; see <a
  href="bpkg-pkg-purge.xhtml"><code><b>bpkg-pkg-purge(1)</b></code></a>).</dd>
  </dl>

  <p>If only the package name was specified without the package version, then
  the <code><b>available</b></code> status word is followed by the list of
  available versions. Versions that are only available for up/down-grading are
  printed in '<code><b>[]</b></code>' (such version are only available as
  dependencies from prerequisite repositories of other repositories). If the
  <code><b>--system</b></code> option is specified, then the last version in
  this list may have the <code><b>sys:</b></code> prefix indicating an
  available system version. Such a system version may be the special
  '<code><b>?</b></code>' value indicating that a package may or may not be
  available from the system and that its version is unknown.</p>

  <p>The <code><b>fetched</b></code>, <code><b>unpacked</b></code>,
  <code><b>configured</b></code>, and <code><b>broken</b></code> status words
  are followed by the version of the package. If the package version was
  specified, then the <code><b>unknown</b></code> status word is also followed
  by the version.</p>

  <p>If the status is <code><b>fetched</b></code>,
  <code><b>unpacked</b></code>, <code><b>configured</b></code>, or
  <code><b>broken</b></code> and newer versions are available, then the
  package version is followed by the <code><b>available</b></code> status word
  and the list of newer versions. To instead see a list of all versions,
  including the older ones, specify the
  <code><b>--old-available</b>|<b>-o</b></code> option. In this case the
  currently selected version is printed in '<code><b>()</b></code>'.</p>

  <p>If the package name was specified with the version, then only the status
  (such as, <code><b>configured</b></code>, <code><b>available</b></code>,
  etc.) of this version is considered.</p>

  <p>If a package is being held, then its name is printed prefixed with
  '<code><b>!</b></code>'. Similarly, if a package version is being held, then
  the version is printed prefixed with '<code><b>!</b></code>'. Held packages
  and held versions were selected by the user and are not automatically
  dropped and upgraded, respectively.</p>

  <p>Below are some examples, assuming the configuration has
  <code><b>libfoo</b></code> <code><b>1.0.0</b></code> configured and held
  (both package and version) as well as <code><b>libfoo</b></code>
  <code><b>1.1.0</b></code> and <code><b>1.1.1</b></code> available from
  source and <code><b>1.1.0</b></code> from the system.</p>

  <pre>bpkg status libbar
libbar unknown

bpkg status libbar/1.0.0
libbar unknown 1.0.0

bpkg status libfoo/1.0.0
!libfoo configured !1.0.0

bpkg status libfoo/1.1.0
libfoo available 1.1.0

bpkg status --system libfoo/1.1.0
libfoo available 1.1.0 sys:1.1.0

bpkg status libfoo
!libfoo configured !1.0.0 available 1.1.0 1.1.1

bpkg status libfoo/1.1.1 libbar
libfoo available 1.1.1
libbar unknown</pre>

  <p>Assuming now that we dropped <code><b>libfoo</b></code> from the
  configuration:</p>

  <pre>bpkg status libfoo/1.0.0
libfoo unknown 1.0.0

bpkg status libfoo
libfoo available 1.1.0 1.1.1</pre>

  <p>And assuming now that we built <code><b>libfoo</b></code> as a system
  package with the wildcard version:</p>

  <pre>bpkg status libfoo
!libfoo configured,system !* available 1.1.0 1.1.1</pre>

  <p>Another example of the status output this time including
  dependencies:</p>

  <pre>bpkg status -r libbaz
!libbaz configured 1.0.0
  libfoo configured 1.0.0
    bison [.bpkg/host/] configured 1.0.0
  libbar configured 2.0.0</pre>

  <p>If the output format is <code><b>json</b></code>, then the output is a
  JSON array of objects which are the serialized representation of the
  following C++ <code><b>struct</b></code>
  <code><b>package_status</b></code>:</p>

  <pre>struct available_version
{
  string version;
  bool   system;
  bool   dependency;
};

struct package_status
{
  string                    name;
  optional&lt;string>          configuration;
  optional&lt;string>          constraint;
  string                    status;
  optional&lt;string>          sub_status;
  optional&lt;string>          version;
  bool                      hold_package;
  bool                      hold_version;
  vector&lt;available_version> available_versions;
  vector&lt;package_status>    dependencies;
};</pre>

  <p>For example:</p>

  <pre>[
  {
    "name": "hello",
    "status": "configured",
    "version": "1.0.0",
    "hold_package": true,
    "available_versions": [
      {
        "version": "1.0.1"
      },
      {
        "version": "2.0.0"
      }
    ],
    "dependencies": [
      {
        "name": "libhello",
        "status": "configured",
        "version": "1.0.2",
      }
    ]
  }
]</pre>

  <p>See the JSON OUTPUT section in <a
  href="bpkg-common-options.xhtml"><code><b>bpkg-common-options(1)</b></code></a>
  for details on the overall properties of this format and the semantics of
  the <code><b>struct</b></code> serialization.</p>

  <p>In <code><b>package_status</b></code>, the
  <code><b>configuration</b></code> member contains the absolute directory of
  a linked configuration if this package resides in a linked configuration.
  The <code><b>constraint</b></code> member is present only if the
  <code><b>--constraint</b></code> option is specified. The
  <code><b>version</b></code> member is absent if the
  <code><b>status</b></code> member is <code><b>unknown</b></code> or
  <code><b>available</b></code> and no package version is specified on the
  command line. If the <code><b>sub_status</b></code> member is
  <code><b>system</b></code>, then the <code><b>version</b></code> member can
  be special <code><b>*</b></code>. The <code><b>dependencies</b></code>
  member is present only if the <code><b>--immediate|-i</b></code> or
  <code><b>--recursive|-r</b></code> options are specified.</p>

  <p>In <code><b>available_version</b></code>, if the
  <code><b>system</b></code> member is <code><b>true</b></code>, then this
  version is available from the system, in which case the
  <code><b>version</b></code> member can be special <code><b>?</b></code> or
  <code><b>*</b></code>. If the <code><b>dependency</b></code> member is
  <code><b>true</b></code>, then this version is only available as a
  dependency from prerequisite repositories of other repositories.</p>

  <h1>PKG-STATUS OPTIONS</h1>

  <dl class="options">
    <dt><code><b>--all</b></code>|<code><b>-a</b></code></dt>
    <dd>Print the status of all the packages, not just held.</dd>

    <dt><code><b>--link</b></code></dt>
    <dd>Also print the status of held/all packages from linked
    configurations.</dd>

    <dt><code><b>--immediate</b></code>|<code><b>-i</b></code></dt>
    <dd>Also print the status of immediate dependencies.</dd>

    <dt><code><b>--recursive</b></code>|<code><b>-r</b></code></dt>
    <dd>Also print the status of all dependencies, recursively.</dd>

    <dt><code><b>--old-available</b></code>|<code><b>-o</b></code></dt>
    <dd>Print old available versions.</dd>

    <dt><code><b>--constraint</b></code></dt>
    <dd>Print version constraints for dependencies.</dd>

    <dt><code><b>--system</b></code></dt>
    <dd>Check the availability of packages from the system.</dd>

    <dt><code><b>--no-hold</b></code></dt>
    <dd>Don't print the package or version hold status.</dd>

    <dt><code><b>--no-hold-package</b></code></dt>
    <dd>Don't print the package hold status.</dd>

    <dt><code><b>--no-hold-version</b></code></dt>
    <dd>Don't print the version hold status.</dd>

    <dt><code><b>--directory</b></code>|<code><b>-d</b></code> <code><i>dir</i></code></dt>
    <dd>Assume configuration is in <code><i>dir</i></code> rather than in the
    current working directory.</dd>
  </dl>

  <h1>COMMON OPTIONS</h1>

  <p>The common options are summarized below with a more detailed description
  available in <a
  href="bpkg-common-options.xhtml"><code><b>bpkg-common-options(1)</b></code></a>.</p>

  <dl class="options">
    <dt><code><b>-v</b></code></dt>
    <dd>Print essential underlying commands being executed.</dd>

    <dt><code><b>-V</b></code></dt>
    <dd>Print all underlying commands being executed.</dd>

    <dt><code><b>--quiet</b></code>|<code><b>-q</b></code></dt>
    <dd>Run quietly, only printing error messages.</dd>

    <dt><code><b>--verbose</b></code> <code><i>level</i></code></dt>
    <dd>Set the diagnostics verbosity to <code><i>level</i></code> between 0
    and 6.</dd>

    <dt><code><b>--stdout-format</b></code> <code><i>format</i></code></dt>
    <dd>Representation format to use for printing to
    <code><b>stdout</b></code>.</dd>

    <dt><code><b>--jobs</b></code>|<code><b>-j</b></code> <code><i>num</i></code></dt>
    <dd>Number of jobs to perform in parallel.</dd>

    <dt><code><b>--no-result</b></code></dt>
    <dd>Don't print informational messages about the outcome of performing a
    command or some of its parts.</dd>

    <dt><code><b>--structured-result</b></code> <code><i>fmt</i></code></dt>
    <dd>Write the result of performing a command in a structured form.</dd>

    <dt><code><b>--progress</b></code></dt>
    <dd>Display progress indicators for long-lasting operations, such as
    network transfers, building, etc.</dd>

    <dt><code><b>--no-progress</b></code></dt>
    <dd>Suppress progress indicators for long-lasting operations, such as
    network transfers, building, etc.</dd>

    <dt><code><b>--diag-color</b></code></dt>
    <dd>Use color in diagnostics.</dd>

    <dt><code><b>--no-diag-color</b></code></dt>
    <dd>Don't use color in diagnostics.</dd>

    <dt><code><b>--build</b></code> <code><i>path</i></code></dt>
    <dd>The build program to be used to build packages.</dd>

    <dt><code><b>--build-option</b></code> <code><i>opt</i></code></dt>
    <dd>Additional option to be passed to the build program.</dd>

    <dt><code><b>--fetch</b></code> <code><i>path</i></code></dt>
    <dd>The fetch program to be used to download resources.</dd>

    <dt><code><b>--fetch-option</b></code> <code><i>opt</i></code></dt>
    <dd>Additional option to be passed to the fetch program.</dd>

    <dt><code><b>--fetch-timeout</b></code> <code><i>sec</i></code></dt>
    <dd>The fetch and fetch-like (for example, <code><b>git</b></code>)
    program timeout.</dd>

    <dt><code><b>--pkg-proxy</b></code> <code><i>url</i></code></dt>
    <dd>HTTP proxy server to use when fetching package manifests and archives
    from remote <code><b>pkg</b></code> repositories.</dd>

    <dt><code><b>--git</b></code> <code><i>path</i></code></dt>
    <dd>The git program to be used to fetch git repositories.</dd>

    <dt><code><b>--git-option</b></code> <code><i>opt</i></code></dt>
    <dd>Additional common option to be passed to the git program.</dd>

    <dt><code><b>--sha256</b></code> <code><i>path</i></code></dt>
    <dd>The sha256 program to be used to calculate SHA256 sums.</dd>

    <dt><code><b>--sha256-option</b></code> <code><i>opt</i></code></dt>
    <dd>Additional option to be passed to the sha256 program.</dd>

    <dt><code><b>--tar</b></code> <code><i>path</i></code></dt>
    <dd>The tar program to be used to extract package archives.</dd>

    <dt><code><b>--tar-option</b></code> <code><i>opt</i></code></dt>
    <dd>Additional option to be passed to the tar program.</dd>

    <dt><code><b>--openssl</b></code> <code><i>path</i></code></dt>
    <dd>The openssl program to be used for crypto operations.</dd>

    <dt><code><b>--openssl-option</b></code> <code><i>opt</i></code></dt>
    <dd>Additional option to be passed to the openssl program.</dd>

    <dt><code><b>--auth</b></code> <code><i>type</i></code></dt>
    <dd>Types of repositories to authenticate.</dd>

    <dt><code><b>--trust</b></code> <code><i>fingerprint</i></code></dt>
    <dd>Trust repository certificate with a SHA256
    <code><i>fingerprint</i></code>.</dd>

    <dt><code><b>--trust-yes</b></code></dt>
    <dd>Assume the answer to all authentication prompts is
    <code><b>yes</b></code>.</dd>

    <dt><code><b>--trust-no</b></code></dt>
    <dd>Assume the answer to all authentication prompts is
    <code><b>no</b></code>.</dd>

    <dt><code><b>--git-capabilities</b></code> <code><i>up</i></code>=<code><i>pc</i></code></dt>
    <dd>Protocol capabilities (<code><i>pc</i></code>) for a
    <code><b>git</b></code> repository URL prefix
    (<code><i>up</i></code>).</dd>

    <dt><code><b>--pager</b></code> <code><i>path</i></code></dt>
    <dd>The pager program to be used to show long text.</dd>

    <dt><code><b>--pager-option</b></code> <code><i>opt</i></code></dt>
    <dd>Additional option to be passed to the pager program.</dd>

    <dt><code><b>--options-file</b></code> <code><i>file</i></code></dt>
    <dd>Read additional options from <code><i>file</i></code>.</dd>

    <dt><code><b>--default-options</b></code> <code><i>dir</i></code></dt>
    <dd>The directory to load additional default options files from.</dd>

    <dt><code><b>--no-default-options</b></code></dt>
    <dd>Don't load default options files.</dd>

    <dt><code><b>--keep-tmp</b></code></dt>
    <dd>Don't remove the <code><b>bpkg</b></code>'s temporary directory at the
    end of the command execution and print its path at the verbosity level 2
    or higher.</dd>
  </dl>

  <h1>DEFAULT OPTIONS FILES</h1>

  <p>See <a
  href="bpkg-default-options-files.xhtml"><code><b>bpkg-default-options-files(1)</b></code></a>
  for an overview of the default options files. For the
  <code><b>pkg-status</b></code> command the search start directory is the
  configuration directory. The following options files are searched for in
  each directory and, if found, loaded in the order listed:</p>

  <pre>bpkg.options
bpkg-pkg-status.options</pre>

  <p>The following <code><b>pkg-status</b></code> command options cannot be
  specified in the default options files:</p>

  <pre>--directory|-d</pre>

  <h1>BUGS</h1>

  <p>Send bug reports to the
  <a href="mailto:users@build2.org">users@build2.org</a> mailing list.</p>

</div>

<div id="footer">
Copyright &#169; 2014-2024 the build2 authors.<br/>
Permission is granted to copy, distribute and/or modify this document under
the terms of the MIT License.
</div>

</body>
</html>
